import React from 'react';
import { BrowserRouter as Router, Route, Link } from 'react-router-dom';

import Home from '../page/Home';
import Detail from '../page/Detail';
import About from '../page/About';

const Routers = () => (
  <Router>
      <div>
        <ul>
          <li><Link to="/">首页</Link></li>
          <li><Link to="/about">关于</Link></li>
          <li><Link to="/detail">详细</Link></li>
        </ul>
        <Route exact path="/" component={Home}/>
        <Route path="/about" component={About}/>
        <Route path="/detail" component={Detail}/>
      </div>
    </Router>
)

export default Routers;